package com.hiwhitley.himei.module.video;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

/**
 * Created by hiwhitley on 2016/9/24.
 */

public class FindMorePagerAdapter extends FragmentPagerAdapter{
    private static final int PAGE_COUNT = 2;
    private static final String[] TITLE = new String[]{"按时间排序", "分享排行"};

    private final String mCategoryName;

    public FindMorePagerAdapter(FragmentManager fm, String categoryName) {
        super(fm);
        mCategoryName = categoryName;
    }

    @Override
    public Fragment getItem(int position) {
      return CommonFindFragment.newInstance(mCategoryName,  position);
    }

    @Override
    public int getCount() {
        return PAGE_COUNT;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return TITLE[position];
    }
}
